package action.system;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;

import core.action.BaseAction;

public class LoginAction extends BaseAction{
	private String loginMessage;
	public String execute(){

		ActionContext actionContext = ActionContext.getContext(); 
	    Map<String, Object> session = actionContext.getSession(); 
	    //session.put("LOGIN_ERROR", ""); 

	    try{
		    Exception e = (Exception)session.get("SPRING_SECURITY_LAST_EXCEPTION");  
		    this.loginMessage= e.getMessage(); 
	    }catch(Exception e){}
	    
	    
		System.out.println("login...");
		return "success";
	}
	public String getLoginMessage() {
		return loginMessage;
	}
	public void setLoginMessage(String loginMessage) {
		this.loginMessage = loginMessage;
	}	
}
